home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #2 / Amiga Plus CD - 2004 - No. 02.iso / AmiSoft / Dev / lang / amigatalk.lha / help / boopsidocs / label_ic.doc < prev    next >
Text File  |  1999-10-30  |  6KB  |  182 lines

  1. TABLE OF CONTENTS
  2.  
  3. label_ic/--datasheet--
  4. label_ic/LABEL_GetClass
  5. label_ic/--datasheet--                                 label_ic/--datasheet--
  6.  
  7.     NAME
  8.         label_ic -- Image class for creating idenification labels
  9.  
  10.     SUPERCLASS
  11.         imageclass
  12.  
  13.     REQUIRES
  14.         None.
  15.  
  16.     DESCRIPTION
  17.         Label is an image class suitable for creating identification labels,
  18.         such as might appear next to or inside a gadget, or as some kind of
  19.         title in a window.  A label consists of text and graphics mixed in
  20.         a variety of ways.
  21.  
  22.     METHODS
  23.         OM_NEW--Create the label image.  Passed to superclass, then OM_SET.
  24.  
  25.         OM_GET--Get object attributes.  Passed to superclass first.
  26.  
  27.         OM_SET--Set object attributes.  Passed to superclass first.
  28.  
  29.         OM_UPDATE--Set object notification attributes.  Passed to superclass
  30.             first.
  31.  
  32.         IM_DRAW--Renders the images.  Overrides the superclass.
  33.  
  34.         All other methods are passed to the superclass, including OM_DISPOSE.
  35.  
  36.     ATTRIBUTES
  37.         IA_Font (struct TextAttr *)
  38.             Font to use for any label text.  Only affects text passed AFTER
  39.             this tag is given.  If you did not use the LABEL_DrawInfo tag
  40.             then you MUST use this tag to specify what font to use.
  41.  
  42.             Applicability is (OM_NEW)
  43.  
  44.         IA_FGPen (LONG)
  45.             Foreground pen for any label text.  Only affects text passed AFTER
  46.             this tag is given.
  47.  
  48.             Defaults to pen 1.
  49.  
  50.             Applicability is (OM_NEW)
  51.  
  52.         IA_BGPen (LONG)
  53.             Background pen for any label text.  Only affects text passed AFTER
  54.             this tag is given.
  55.  
  56.             Defaults to pen 0.
  57.  
  58.             Applicability is (OM_NEW)
  59.  
  60.         IA_Mode (UBYTE)
  61.             Draw mode for rendering text.  Only affects text passed AFTER
  62.             this tag is given.
  63.  
  64.             Defaults to JAM1.
  65.  
  66.             Applicability is (OM_NEW)
  67.  
  68.         LABEL_DrawInfo (struct DrawInfo *)
  69.             Contains important pen information.  This is used to get default
  70.             font information.  If you do not use IA_Font to specify fonts
  71.             then you MUST pass the screen DrawInfo before you give the
  72.             LABEL_Text tag.
  73.  
  74.             Defaults to NULL.
  75.  
  76.             Applicability is (OM_NEW, OM_GET)
  77.  
  78.         LABEL_Text (STRPTR)
  79.             A text string to render.  A '\n' in the string will cause the
  80.             text position to move to a new line.  The first underscore ('_')
  81.             in the string will be used to underline the proceeding character
  82.             in the string.  Any number of text strings and images can be
  83.             provided in a label, mixed at will.
  84.  
  85.             Applicability is (OM_NEW)
  86.  
  87.         LABEL_SoftStyle (UBYTE)
  88.             SoftStyle for any label text.  Only affects text passed AFTER
  89.             this tag is given.
  90.  
  91.             Defaults to FS_NORMAL.
  92.  
  93.             Applicability is (OM_NEW)
  94.  
  95.  
  96.         LABEL_Image (struct Image *)
  97.             An image to render.  Any number of text strings and images can
  98.             be provided in a label, mixed at will.
  99.  
  100.             Applicability is (OM_NEW)
  101.  
  102.         LABEL_DisposeImage (BOOL)
  103.             Indicates that you want the NEXT image passed via LABEL_Image
  104.             to be disposed automatically when the label instance is
  105.             disposed.  This implies that the next image passed MUST be a
  106.             BOOPSI image (since static images cannot be disposed).  This
  107.             will only affect the next image passed, therefore you must
  108.             specify this tag for every image you wish to have disposed of
  109.             automatically.
  110.  
  111.             Defaults to FALSE.
  112.  
  113.             Applicability is (OM_NEW)
  114.  
  115.         LABEL_Mapping (UWORD *)
  116.             Pen mapping array, affects the NEXT image passed via
  117.             LABEL_Image ONLY.  You should pass a mapping for non-BOOPSI
  118.             images only, it is expected that BOOPSI images would be
  119.             correctly pen-mapped.
  120.  
  121.             The mapping array must have at least as many elements as the
  122.             image has bit planes (i.e. 1 << Image.Depth).  For element
  123.             i in the array you put in the new pen that you want pen i in
  124.             your image to be mapped to.  For a typical 4-colour image, you
  125.             might use the following mapping:
  126.  
  127.                 UWORD mapping[4];
  128.                 struct DrawInfo *drinfo;
  129.  
  130.                 /* Before hand we'll have obtained the screen's DrawInfo.
  131.                  */
  132.                 mapping[0] = drinfo->dri_Pens[BACKGROUNDPEN];
  133.                 mapping[1] = drinfo->dri_Pens[SHADOWPEN];
  134.                 mapping[2] = drinfo->dri_Pens[SHINEPEN];
  135.                 mapping[3] = drinfo->dri_Pens[FILLPEN];
  136.  
  137.             Applicability is (OM_NEW)
  138.  
  139.         LABEL_Justification (UWORD)
  140.             Justification for entire label.  This can be either LJ_LEFT
  141.             (the default), LJ_CENTRE or LJ_RIGHT.
  142.  
  143.             Applicability is (OM_NEW, OM_GET)
  144.  
  145.         LABEL_Key (UWORD)
  146.             For getting the key that was underscored in text passed with
  147.             LABEL_Text.
  148.  
  149.             Applicability is (OM_GET)
  150.  
  151.     SEE ALSO
  152.         intuition.library/GetScreenDrawInfo()
  153. label_ic/LABEL_GetClass                               label_ic/LABEL_GetClass
  154.  
  155.     NAME
  156.         LABEL_GetClass -- Gets the pointer to the label image class.
  157.  
  158.     SYNOPSIS
  159.         label_class = LABEL_GetClass();
  160.         D0
  161.  
  162.         Class * LABEL_GetClass(VOID);
  163.  
  164.     FUNCTION
  165.         Obtains the pointer to the Label gadget class for use with
  166.         NewObject().  This function always returns a valid pointer so
  167.         you do not need to check it.  The reason is that if the library
  168.         opens fine, then the pointer returned is already setup.  (Of course
  169.         this implies that if opening the library fails, you shouldn't be
  170.         calling this.)
  171.  
  172.         Note that this function does not create the class, that is done
  173.         when the class library is opened.
  174.  
  175.     INPUTS
  176.         Nothing.
  177.  
  178.     RESULT
  179.         label_class - Pointer to the Label gadget class.
  180.  
  181.     SEE ALSO
  182.